<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    <!--switch 多半用于游戏技能释放-->
    // let mingci = 3;
    // switch (mingci) {
    //     case 1:
    //         console.log("苹果手机")
    //         break;
    //     case 2:
    //         console.log("显卡")
    //         break;
    //     case 3:
    //         console.log("iPad")
    //         break;
    //     default:
    //         console.log("U盘一个")
    // }
    let day = 5;
    switch (day) {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
            console.log("上学");
            break;
        case 6:
        case 7:
            console.log("放假");
    }
//遍历对象用for in
//遍历数组用for  of
const player = {name:'tom',age:20};
    for (let pop in player){
        if(!player.hasOwnProperty(pop)){
            continue;
        }
        console.log(pop + ':' + player[pop]);
    }
</script>
</body>
</html>